repo-pull: properly store the cancellable
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 31 Aug 2016 15:02:01 +0000 (12:02 -0300)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 31 Aug 2016 15:21:06 +0000 (15:21 +0000)
commitcafc517c6bb93bb45777b6969125cb9599f217f6
treed7df9f71a54583e3d3da96cec329bee66eda5731
parent1dc69dc879612abfd6509a1e81c04990fed8ea49
repo-pull: properly store the cancellable

OSTree function ostree_repo_pull_with_options starts a
series of operations that makes heavy use of the PullData's
cancellable.

This isn't effective, however, since nowhere in the code
the OtPullData.cancellable field is set. This is visible,
for example, when trying to cancel a Flatpak pull and nothing
happens, because the cancellable is not properly passed
to the pull data.

Fix that by setting the cancellable field of the pull data. It
owns a reference for safety reasons, and unreferences it at the
end of the operation.

ostreedev/ostree#482

Closes: #483
Approved by: cgwalters
src/libostree/ostree-repo-pull.c